<?php
$shop = new Shop();
$shop->checkUser();//检查用户合法性，防止攻击

$order = $shop->getOrderByUser('close');

if(isset($_POST['submit'])){
	$url = "/orders/".$_POST['orders_id'];
	if($shop->updateOrder(array("status" => 0),'orders_id',$_POST['orders_id']))echo "<script type='text/javascript'>location.href='$url';</script>";
}
//var_dump($order[0]);
?>